import React,{ Suspense } from 'react'
import { Navigate } from 'react-router-dom'
// 路由页面渲染
import RenderRouter from './RenderRouter'

// token验证
export default function AuthRouter ({ ...props }) {
	const istoken = sessionStorage.getItem('token')
	return (
		istoken ? <RenderRouter {...props}></RenderRouter> : <Navigate to='/login'></Navigate>
	)
}